Complex (Hermitian) eigenvalues/eigenvectors #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
on request of a colleague I've added the computation of eigenvectors/eigenvalues of complex and complex hermitian matrices as native and convenience methods. For this I received some funding from the University of Konstanz (Germany). Now, I would like to share this work with you, to uncover potential mistakes and to make a small contribution to your project.
For the computation of eigenvalues/eigenvectors of complex matrices (Fortran routines CGEEV and ZGEEV) the native methods already existed, but I added convenience methods for calling them from the
Eigen
class. For this I overloaded the existing methodsEigen.eigenvalue
andEigen.eigenvector
in a way that seems consistent with the current design. Further I've implemented basic tests toTestEigen.java
to check my implementation.For the computation of eigenvalues/eigenvectors of complex Hermitian matrices (Fortran routines CHEEV and ZHEEV) I added the native methods (through an addition to the Makefile which automatically generates the C code). Further, I created new convenience methods
Eigen.hermitianEigenvalues
andEigen.hermitianEigenvectors
for which a call assumes a Hermitian input matrix (otherwise, the results might be incorrect). Again, I've included tests that cover some basic cases.I'll be glad to receive feedback on this implementation and I even have a few days left to work on further functionality related to complex and Hermitian matrices (please let me know if there are any preferences from your side).